package com.qk.management.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.qk.domian.business.BusinessCountDO;
import com.qk.domian.clue.ClueCountDO;
import com.qk.management.aop.anno.PortalCache;
import com.qk.management.mapper.BusinessMapper;
import com.qk.management.mapper.ClueMapper;
import com.qk.management.service.ReportOverviewService;
import com.qk.vo.portal.PortalVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:Shuna
 * @Date: 2025/10/15 14:52
 * @Description:
 */
@Service
@Slf4j
public class ReportOverviewServiceImpl implements ReportOverviewService {

    @Autowired
    private ClueMapper clueMapper;
    @Autowired
    private BusinessMapper businessMapper;



    @PortalCache
    @Override
    public PortalVO reportOverview() {
        ClueCountDO clueCountDO = clueMapper.selectCountClue();
        BusinessCountDO businessCountDO = businessMapper.selectCountBusiness();
        PortalVO portalVO = BeanUtil.copyProperties(clueCountDO, PortalVO.class);
        BeanUtil.copyProperties(businessCountDO, portalVO);
        return portalVO;
    }
}
